package com.example.ims;

import com.example.ims.fame.InitFame;
import com.example.ims.pojo.Commodity;
import com.example.ims.service.CommodityService;
import org.springframework.beans.BeansException;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication
//@ComponentScan("com.example.ims.fame")

public class ImsApplication {
	public static void main(String[] args) {
		try {
			SpringApplicationBuilder builder = new SpringApplicationBuilder(ImsApplication.class);
			ApplicationContext context = builder.headless(false).web(WebApplicationType.NONE).run(args);
			InitFame easytodoApp = new InitFame(context);
			easytodoApp.showUI();
		} catch (BeansException e) {
			e.printStackTrace();
		}

	}

}